export class ClubModel {

    public actor: number;
    public clubid: number;
    public creator: number;
    public message: string;
    public name: string;
    public state: number;
    public tablecount: number;
    public usercount: number;
    public headimg: string
    public lv: number
    public nick_name: string
    public online: number
    public seemember: number;
    public seerank: number;
    public limit_join: number;
    public user_state:number;
    public quanxian: string


    public static data2ModelList(clubs: Array<object>) {
        let clubList: Array<ClubModel> = []
        for (let i = 0; i < clubs.length; i++) {
            let model: ClubModel = new ClubModel();
            model.clubid = clubs[i]["clubid"]
            model.actor = clubs[i]["actor"]
            model.creator = clubs[i]["creator"]
            model.message = clubs[i]["message"]
            model.name = clubs[i]["name"]
            model.state = clubs[i]["state"]
            model.tablecount = clubs[i]["tablecount"]
            model.usercount = clubs[i]["usercount"]
            model.headimg = clubs[i]["headimg"]
            model.lv = clubs[i]["lv"]
            model.nick_name = clubs[i]["nick_name"]
            model.online = clubs[i]["online"]
            model.seemember = clubs[i]["seemember"]
            model.seerank = clubs[i]["seerank"]
            model.limit_join = clubs[i]["limit_join"]
            model.user_state = clubs[i]["user_state"]
            model.quanxian = clubs[i]["quanxian"]
            clubList[i] = model;
        }
        return clubList
    }
}